<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.hll.util.StringUtil"%>
<%@ page import="com.Constants"%>
<%@ page import="com.hll.model.User"%>

<%
  User user = (User) session.getAttribute(Constants.USER);
%>

<!-- 用户信息开始 -->
<div class="user-information">
  <div class="user-header">
    <%
      if (StringUtil.isEmpty(user.getAvatar())) {
    %>
    <img src="<%=request.getContextPath()%>/static/images/MyBooks_IMG_DefaultAvatar_80x80.png" />
    <%
      } else {
    %>
    <img src="<%=request.getContextPath()%>/<%=user.getAvatar()%>" />
    <%
      }
    %>
    <div class="user-name"><%=StringUtil.htmlEncode(user.getUserName())%></div>
  </div>
  <div class="user-basis">
    <div class="tip">
      <label>基本资料</label>
      <img src="<%=request.getContextPath()%>/static/images/BTN_Edit_20x20.png" />
    </div>
    <ul>
      <li><label>部门&nbsp;:&nbsp;</label><span><%=StringUtil.htmlEncode(user.getDept())%></span></li>
      <li><label>电话&nbsp;:&nbsp;</label><span><%=StringUtil.htmlEncode(user.getMobileNumber())%></span></li>
      <li><label>邮箱&nbsp;:&nbsp;</label><span><%=StringUtil.htmlEncode(user.getEmail())%></span></li>
      <li><label>地址&nbsp;:&nbsp;</label><span><%=StringUtil.htmlEncode(user.getAddress())%></span></li>
    </ul>
  </div>
</div>

<div class="user-message">
  <div class="my-message">
    <label>我的消息</label><label class="message-tip"></label><label class="tip-count">5</label>
  </div>
  <div class="my-request">
    <label>借书请求</label><label class="message-tip"></label><label class="tip-count">6</label>
  </div>
</div>
<!-- 用户信息结束 -->